<?php
// Setup the MODx API
define('MODX_API_MODE', true);

// initiate a new document parser
include_once(MODX_MANAGER_PATH.'/includes/document.parser.class.inc.php');
$modx = new DocumentParser;
 
$modx->db->connect(); // provide the MODx DBAPI
$modx->getSettings(); // provide the $modx->documentMap and user settings

$action = $_POST['action'];

unset($_POST['q']);
unset($_POST['action']);

//Включаем механизм сессий
startCMSSession();

include 'index.inc.php';

$app = new c_router_util($action);

echo $app->loader();

?>